﻿using System;
using LightWork;
using LightWork.DomainModel;
using LightWork.DataAccess;
using ZabbixPartner.DomainModel;
using ZabbixPartner.Repositories;
using ZabbixPartner.Services;

using Autofac;

namespace LightServer.Tester
{
	public class Program
	{
		[STAThread]
		private static void Main(string[] args)
		{
			try
			{
				var hostSrv = Bootstrap.AutofacContainer.Resolve<HostService>();

				hostSrv.AddHost("10.70.191.33", 10051, "TH_DB506_1","MODBUS", "TH_DB506", 1, "一楼机房温湿度传感器 1 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "TH_DB506_2","MODBUS", "TH_DB506", 2, "一楼机房温湿度传感器 2 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "TH_DB506_3","MODBUS", "TH_DB506", 3, "一楼机房温湿度传感器 3 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "TH_DB506_4","MODBUS", "TH_DB506", 4, "一楼机房温湿度传感器 4 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "TH_DB506_5","MODBUS", "TH_DB506", 5, "一楼机房温湿度传感器 5 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "TH_DB506_6","MODBUS", "TH_DB506", 6, "一楼机房温湿度传感器 6 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "TH_DB506_7","MODBUS", "TH_DB506", 7, "一楼机房温湿度传感器 7 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "TH_DB506_8","MODBUS", "TH_DB506", 8, "一楼机房温湿度传感器 8 ", "COM3", 9600);

				hostSrv.AddHost("10.70.191.33", 10051, "TH_GF801TH_1","MODBUS", "TH_GF801", 1, "二楼机房温湿度传感器 1 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "TH_GF801TH_2","MODBUS", "TH_GF801", 2, "二楼机房温湿度传感器 2 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "TH_GF801TH_3","MODBUS", "TH_GF801", 3, "二楼机房温湿度传感器 3 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "TH_GF801TH_4","MODBUS", "TH_GF801", 4, "二楼机房温湿度传感器 4 ", "COM3", 9600);

				hostSrv.AddHost("10.70.191.33", 10051, "AC_EMERSON_1","YDN23", "AC_EMERSON", 1, "一楼机房艾默生精密空调 1 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "AC_EMERSON_2","YDN23", "AC_EMERSON", 2, "一楼机房艾默生精密空调 2 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "AC_EMERSON_3","YDN23", "AC_EMERSON", 3, "一楼机房艾默生精密空调 3 ", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "AC_EMERSON_4","YDN23", "AC_EMERSON", 4, "一楼机房艾默生精密空调 4 ", "COM3", 9600);

				hostSrv.AddHost("10.70.191.33", 10051, "AC_STULZ_1","MODBUS","AC_STULZ", 1, "二楼世图兹精密空调 1", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "AC_STULZ_2","MODBUS","AC_STULZ", 2, "二楼世图兹精密空调 2", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "AC_STULZ_3","MODBUS","AC_STULZ", 3, "二楼世图兹精密空调 3", "COM3", 9600);
				hostSrv.AddHost("10.70.191.33", 10051, "AC_STULZ_4","MODBUS","AC_STULZ", 4, "二楼世图兹精密空调 4", "COM3", 9600);

				hostSrv.AddHost("10.70.191.33", 10051, "UPS_EATON_1","SHITHID",  "UPS_EATON", 1, "地下车库UPS机房 伊顿UPS", "COM3", 9600);

				hostSrv.AddHost("10.70.191.33", 10051, "UPS_EMERSON_1","YDN23","UPS_EMERSON", 1, "地下车库UPS机房 艾默生UPS", "COM3", 9600);

				hostSrv.AddHost("10.70.191.33", 10051, "UPS_MGE_1","SNMP", "UPS_MGE", 1, "一楼小机房梅兰日兰UPS—1", null,null,"127.0.0.1",161);
				hostSrv.AddHost("10.70.191.33", 10051, "UPS_MGE_2","SNMP", "UPS_MGE", 2, "一楼小机房梅兰日兰UPS—2", null,null,"127.0.0.1",161);


			}
			catch (Exception ex)
			{
				Console.WriteLine(ex.Message);
			}

			Console.WriteLine("All done,press any key exit !");
			Console.Read();
		}
	}
}
